﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Backend_Order_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		this.Form.Action = "Backend/Order/Default.aspx";
		GetOrder();
    }

	protected void GetOrder()
	{
		orderView.DataSource = EF_OrderAccess.GetOrder();
		orderView.DataBind();
	}

	// Load the details of the selected order
	protected void grid_SelectedIndexChanged(object sender, EventArgs e)
	{
		string destination = String.Format("OrderDetail.aspx?OrderID={0}",
		orderView.DataKeys[orderView.SelectedIndex].Value.ToString());
		Response.Redirect(destination);
	}
}